﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using UserStoryTrackerDemo.Controllers;
using Should;
using UserStoryTrackerDemo.Models;

namespace UserStoryTrackerDemo.UnitTests.Controllers
{
	[TestClass]
	public class UserStoriesControllerTest
	{
		[TestMethod]
		public void IndexTestForPage()
		{
			var controller = new UserStoriesController();
			var result = (ViewResult) controller.Index();
			Assert.AreEqual("User Story List", result.ViewBag.Message);

		}

		[TestMethod]
		public void IndexTestItems()
		{
			var controller = new UserStoriesController();
			var result = (ViewResult)controller.Index();
			((List<UserStoryVM>)result.Model).Count().ShouldEqual(3);

		}
	}
}